<!DOCTYPE html>
<html lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <title>Title</title>
    </h:head>
    <h:body>
        <h:form>
            <p:growl id="messages" /> 
            <p:menu style="width:95%" >
                    <c:if test="#{utilisateurController.getSelected().name != null}">
                            <p:menuitem value="Home" action="/user/UserHome.xhtml?faces-redirect=true" ajax="false" icon="ui-icon-home" />
                            <p:menuitem value="Mon panier" action="/panier.xhtml?faces-redirect=true" ajax="false" icon="ui-icon-home" />
                            <p:menuitem value="Categories" action="/Categories/Categories.xhtml?faces-redirect=true"  icon="ui-icon-power"/>
                            
                            <p:menuitem   value="Logout" action="#{utilisateurController.logOut}" icon="ui-icon-power"/>
                          
                          
                        
                    </c:if>
                    <c:if test="#{utilisateurController.getSelected().name== null}">
                         <p:menuitem   value="Login" action="/login.xhtml?faces-redirect=true" icon="ui-icon-power" />
                    </c:if>
                
              </p:menu>
        </h:form>
    </h:body>
</html>
